<html lang="en">
<head>
    <title>游记推荐管理</title>
<#include "../common/header.ftl">

    <link type="text/css" rel="stylesheet" href="/js/plugins/uploadifive/uploadifive.css"/>
    <script type="text/javascript" src="/js/plugins/uploadifive/jquery.uploadifive.min.js"></script>
    <link href="/js/jqPaginator/jqPagination.css" rel="stylesheet" type="text/css">
    <script type="text/javascript" src="/js/jqPaginator/jq-paginator.min.js"></script>
    <script type="text/javascript" src="/js/system/emoji.js"></script>
</head>
<script>
    //将 (中文)   格式数据替换成标签图片:
    function emoji(str) {
        //表情图片资源, 从马蜂窝扣出来的, 可以百度:
        //1:HttpURLConnection 使用  jdk自带的 代码中如何发起http请求
        //2:HttpClient  第三方http请求发送的框架
        //3:webmagic  专门用于爬虫框架
        //现金付款山东省看得(大笑小蜂)见风科技适(大笑小蜂)得府君书(得意小蜂)的开发决胜巅峰
        //匹配中文
        var reg = /\([\u4e00-\u9fa5A-Za-z]*\)/g;

        var matchArr = str.match(reg);
        if (!matchArr) {
            return str;
        }
        for (var i = 0; i < matchArr.length; i++) {
            str = str.replace(matchArr[i], '<img src="' + EMOJI_MAP[(matchArr[i])] + '"style="width: width:28px;"/>')
        }
        return str;
    }
    //替换表情
    $(function () {
        var ps = $("._j_reply_content");
        console.log(ps);
        for (var i = 0; i < ps.length; i++) {
            $(ps[i]).html(emoji($(ps[i]).html() + ""));
        }
    })

</script>
<body>
<!--左侧菜单回显变量设置-->
<#assign currentMenu="travelCommentList">

<div class="container-fluid " style="margin-top: 20px">
<#include "../common/top.ftl">
    <div class="row">
        <div class="col-sm-2">
        <#include "../common/menu.ftl">
        </div>
    <div class="col-sm-10">
        <div class="row">
            <div class="col-sm-12">
                <h1 class="page-head-line">游记评论管理</h1>
            </div>
        </div>
    <#setting number_format="#">
        <!--高级查询--->
    <#-- <form class="form-inline" id="searchForm" action="/strategyCommend/list" method="post">
         <input type="hidden" name="currentPage" id="currentPage" value="1">
         <a href="JavaScript:;" class="btn btn-success inputBtn"><span class="glyphicon glyphicon-plus"></span>  添加</a>
     </form>-->

    <table class="table table-striped table-hover">
        <thead>
        <tr>
            <th>序号</th>
            <th>用户名</th>
            <th>用户头像</th>
            <th>评论内容</th>
            <th>游记标题</th>
            <th>操作</th>
        </tr>
        </thead>
    <#list pageInfo.list as entity>
        <tr>
            <td>${entity_index+1}</td>
            <td>${entity.username!}></td>
            <td><img src="${entity.headUrl!}" width="50px">></td>
            <td>
                <div class="mcmt-word">
                    <p class="_j_reply_content">${entity.content}</p>
            </td>
    </div>

        <td>${entity.travelTitle!}</td>

        <td>
        <#--<a class="btn btn-info btn-xs inputBtn" href="javascript:;" data-json='${entity.jsonString}'>
            <span class="glyphicon glyphicon-edit"></span> 编辑
        </a>-->
            <a href="javascript:;" class="btn btn-danger btn-xs deleteBtn"
               data-url="/comment/travelComment/delete?id=${entity.id}">
                <span class="glyphicon glyphicon-trash"></span> 删除
            </a>
        </td>
        </tr>
    </#list>
        </table>
    <#--分页-->
    <#include "../common/page.ftl"/>
    </div>
</div>
</div>
</body>
</html>